import router from "../router"
import $bus from "../utils/bus"
router.beforeEach((to,from)=>{
    let token=sessionStorage.getItem('token')
    if(!token){
        if(to.path!=="/login"){
            return{
                path:'/login'
            }
        }
    }    
})
router.afterEach((to,from)=>{
    $bus.$emit('bread',to.matched)

})